const { GettextExtractor, JsExtractors, HtmlExtractors } = require('gettext-extractor');

let extractor = new GettextExtractor();

extractor
    .createJsParser([
        JsExtractors.callExpression('_', {
            arguments: {
                text: 0,
                context: 1
            }
        }),
        JsExtractors.callExpression('t', {
            arguments: {
                text: 0,
                textPlural: 1,
            }
        })
    ])

extractor
    .createHtmlParser([
        HtmlExtractors.elementContent('translate, [translate]')
    ])
    .parseFilesGlob('./pages/**/*.@(ts|js|tsx|jsx|vue)');





extractor.savePotFile('./messages.pot');

extractor.printStats();